1. Field of the Invention
This invention relates to computer data storage systems, and more particularly to data storage systems including mass storage devices such as hard disk drives.
2. Description of the Related Art
A typical computer system includes one or more hard disk drives (i.e., disk drives) for storing data. The disk drive(s) form non-volatile memory of the computer system; data stored within the disk drive(s) remains persistent even in the absence of applied electrical power. FIG. 1 is a diagram illustrating logical relationships between a file system layer 10, a drive controller layer 12, and disk drive(s) 14 of the typical computer system. Disk drive(s) 14 typically stores data in “block” locations of disk drive(s) 14. Each block location includes one or more contiguous sectors, where a sector is the smallest disk storage unit. File system layer 10 manages the usage of the block locations, and maintains information as to whether each block location is: (i) currently used to store data (i.e., is “in use”), or (ii) not currently used to store data (i.e., is “available” or “free”). File system layer 10 may include, for example, file system software of an operating system.
A typical disk drive includes multiple, disk-shaped platters coated with a layer of a magnetic material, and an equal number of pairs of read/write heads (i.e., “heads”). The heads transform electrical signals to magnetic signals during write operations, and transform magnetic signals to electrical signals during read operations. Each head is attached to an end of an arm, and positioned adjacent to a surface of one of the platters. The arms are connected together such that they move in unison. During operation of the disk drive, the platter is rotated about an axis, and the connected arms are moved to properly position the heads. The platters are divided into multiple tracks arranged as concentric rings. Corresponding tracks on the surfaces of the platters define different cylinders of the disk drive, and each track is divided into sectors.
During a typical write operation, file system layer 10 determines one or more “free” block locations of disk drive(s) 14 where data may be written (i.e., stored), and issues a write command to drive controller layer 12. The write command includes the data and specifies the one or more “free” block locations of disk drive(s) 14 where the write data is to be stored. The specified one or more “free” block locations of disk drive(s) 14 where the write data is to be stored may be translated to drive, cylinder, head, and/or sector information of disk drive(s) 14. Drive controller layer 12 translates the write command according to an interface standard, and conveys the translated write command to disk drive(s) 14. In response to the write command, disk drive(s) 14 stores the data in the “free” block locations specified by the write command. In addition, file system layer 10 updates its block location usage information to reflect that the block locations of disk drive(s) 14 have been transitioned from “free” to “in use”.
During a typical read operation to retrieve stored data from disk drive(s) 14, file system layer 10 determines the one or more block locations of disk drive(s) 14 where the desired data is stored, and issues a read command to drive controller layer 12 specifying the one or more block locations. The specified one or more block locations of disk drive(s) 14 where the desired data is stored may be translated to drive, cylinder, head, and/or sector information of disk drive(s) 14. Drive controller layer 12 translates the read command according to the interface standard, and conveys the translated read command to disk drive(s) 14. In response to the read command, disk drive(s) 14 reads the data from the block locations specified by the read command, and provides the data to drive controller layer 12. Drive controller layer 12 in turn provides the read data to file system layer 10.
In order to access a different cylinder of the disk drive, a mechanical movement of the arms must occur. Such mechanical movements require relatively long periods of time. Also, even when the head is at the correct cylinder/head, a rotational delay is incurred for the disk to rotate until the correct location is under the head. As a result, the above describe typical write and read operations create several performance issues for the typical computer system. To minimize the mechanical and rotational delays, it would be desirable for writes to occur to a free block location as close to the current head position as possible. For the file system to attempt to perform writes near the current head position, file system layer 10 may need to know: (i) the internal “geometry” of disk drive(s) 14 (i.e., the number of cylinders, heads, and sectors of disk drive(s) 14), and (ii) the current position of the heads of disk drive(s) 14. Although head position estimation algorithms exist, delays between disk drive(s) 14 and file system layer 10 make it difficult to determine head position accurately. As file system layer 10 cannot accurately predict which “free” block locations are near one or more heads of disk drive(s) 14 at any given time, write operations may not be as efficient as desired. As file systems become even further removed from the disk drives, such as in storage area networks (SANs), the latencies between the file system layer and the drives may increase making drive head location prediction even more difficult. In addition, where disk drive(s) 14 includes multiple disk drives, the burden of tracking the current head position of all the disk drives may present a significant amount of overhead for file system layer 10.
It would thus be desirable to have a computer system wherein decisions as to where data should be stored in a disk drive are made such that write operation efficiencies are improved.